
import instance from "../request";

/* 

/orderSetting/{id}
获取指定订单设置
*/

export interface IorderSetting {
  commentOvertime: number | string;
  confirmOvertime: number | string;
  finishOvertime: number | string;
  flashOrderOvertime: number | string;
  id?: number | string;
  normalOrderOvertime: number | string;
}

export const OrderSetting = (id: number): Promise<IorderSetting> =>
  instance.get(`orderSetting/${id}`);

/* 
  /orderSetting/update/{id}  修改指定订单设置
*/

export const OrderSettingUpdate = (
  data: IorderSetting
): Promise<IorderSetting> =>
  instance.post(`orderSetting/update/${data.id}`, data);
